
package com.wyzz.hr.base;

import java.io.Serializable;
import java.util.HashSet;

public class UsersAuthority implements Serializable {

	public UsersAuthority(String inputModuleNo, String inputConditionNo[]) {
		moduleNo = inputModuleNo;
		if (inputConditionNo == null || inputConditionNo.length == 0) {
			conditionNo = null;
			filter = null;
		} else if (inputConditionNo.length == 1) {
			conditionNo = inputConditionNo[0];
			filter = null;
		} else {
			conditionNo = inputConditionNo[0];
			filter = inputConditionNo[1];
		}
	}

	public String getModuleNo() {
		return moduleNo;
	}

	public void setModuleNo(String moduleNo) {
		this.moduleNo = moduleNo;
	}

	public String getConditionNo() {
		return conditionNo;
	}

	public void setConditionNo(String conditionNo) {
		this.conditionNo = conditionNo;
	}

	public String getFilter() {
		return filter;
	}

	public void setFilter(String filter) {
		this.filter = filter;
	}

	public int hashCode() {
		int prime = 31;
		int result = 1;
		result = 31 * result + (moduleNo != null ? moduleNo.hashCode() : 0);
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UsersAuthority other = (UsersAuthority) obj;
		if (moduleNo == null) {
			if (other.moduleNo != null)
				return false;
		} else if (!moduleNo.equals(other.moduleNo))
			return false;
		if (conditionNo == null)
			return true;
		return conditionNo.equals(other.conditionNo);
	}

	public static void main(String args[]) {
		HashSet set = new HashSet();
		set.add(new UsersAuthority("411", new String[] { "AA", null }));
		System.out.println();
	}

	private static final long serialVersionUID = 0x82abd038eff14b74L;
	private String moduleNo;
	private String conditionNo;
	private String filter;
}
